#include<iostream>
using namespace std;;

int main()               //简单A/B和A%B问题
{
    int a,b;
    cin >> a >> b;
    cout << a/b << " " << a%b << endl;;
    return 0;
}